/**
 * \license
 * Copyright Lassi Marttala 2013
 * 
 * This file is part of dlt2jpa.
 *
 * dlt2jpa is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * dlt2jpa is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with dlt2jpa.  If not, see <http://www.gnu.org/licenses/>.
 */

package net.fizzl.dlt;

public class ByteArrayUtils {
	public static byte[] concat(byte src[], byte dst[]) {
		byte ret[] = new byte[src.length + dst.length];
		System.arraycopy(dst, 0, ret, 0, dst.length);
		System.arraycopy(src, 0, ret, dst.length, src.length);
		return ret;
	}

	public static byte[] removeHead(byte[] buf, int length) {
		byte ret[] = new byte[buf.length - length];
		System.arraycopy(buf, length, ret, 0, buf.length-length);
		return ret;
	}
}
